<template>
	<view class="guideList" :style="is_change&&powerRemove==false?'margin-bottom:260rpx':'margin-bottom:162rpx'">
		<navBar isBack backColor="#000000" title="清单" color="#000000" background="#fff"></navBar>
		
		<view class="gL_topNum" v-if="!type&&forwardOffer==true">
			<view class="comeWhere">
				<image :src="headImg" mode=""></image>
				<view class="comeWhereInfo">来自<span>{{userName}}</span>的订单</view>
			</view>
			<view class="">
				共{{allNum}}件家具
			</view>
		</view>
		<view class="gL_topNum" v-else>共{{allNum}}件家具<view><span @click="_toAddShop">添加商品</span><span @click="_toManage">{{powerRemove?'完成':'管理'}}</span></view></view>

		<!-- 店铺商品列表 -->
		<view class="gL_shopList" v-for="(item,index) in shopList" :key="index">
			<view class="gL_shopRoom">
				<view class="gL_roomTit">
					<checkbox-group v-if="powerRemove" @change="_shopRoomAllCheck(index)">
						<checkbox :checked="item.checked"></checkbox>
					</checkbox-group>
					<view class="gL_roomImg">
						<image :src="item.store_logo" mode=""></image>
					</view>

					<view class="gL_roomInfo">{{item.store_name}}
						<p>{{item.roomAddress}}</p>
					</view>
				</view>
				<view class="gL_goRoomInfo">
					<view class="gL_goRoom" @click="_toShopRoom(item.store_id)">进店</view>
					<view class="gL_goRoom roomMap">
						<view class="iconfont icon-tubiaozhizuomoban1"></view>
					</view>
				</view>

			</view>
			<!-- 商品列表 -->
			<view class="gL_allShopList" v-for="(item1,index1) in item.medical_list" :key="index1">
				<view class="gL_allShopItem">
					<view class="gL_allItemTop">
						<checkbox-group v-if="powerRemove" @change="_shopCheck(index,index1)">
							<checkbox :checked="item1.checked"></checkbox>
						</checkbox-group>
						<view class="gL_shopImg" @click="_toGuideDetail(item1.product_id)">
							<image :src="item1.main_imgurl" mode=""></image>
							<view class="gL_shop5D" @click.stop="_toFiveD">
								<view class="gL_5Dicon iconfont icon-tubiaozhizuomoban"></view>
								5D
							</view>
						</view>
						<view class="gL_shopInfo">
							<view class="gL_title omit-1" @click="_toGuideDetail(item1.product_id)">{{item1.product_title}}</view>
							<view class="gL_spec" @click="_choiceSpec(item1)">
								<view v-if="!item1.sku_id" style="font-size: 20rpx;">当前规格已下架，请重新选择</view>
								<view v-else>
									<view class="specList omit-1" v-if="!item1.attribute[0].attr_name"><span v-for="(i,v) in item1.attribute">{{i.value+' / '}}</span></view>
									<view class="specList omit-1" v-else><span v-for="(i,v) in item1.attribute">{{i.attr_name+':'+i.attr_value+'; '}}</span></view>
								</view>
								<view class="iconfont icon-arrow-left-copy"></view>
							</view>
							<span class="price">￥{{item1.price}}</span>
						</view>
					</view>
					<view class="gL_allItemBottom">
						<view class="gL_minus" @click="_reduceNum(item1)"></view>
						<view class="gL_ShopNum">{{item1.cart_num}}</view>
						<view class="gL_add" @click="_addNum(item1)"></view>
					</view>
				</view>
				<view class="gL_border" v-if="index1+1 !== item.child.length"></view>
			</view>
		</view>

		<!-- 规格弹框 -->
		<view class="gL_specShadow" v-if="specShadow">
			<view class="gL_specInfo">
				<view class="gL_specInfoTop">
					<view class="spec_shop">
						<image :src="specList.main_imgurl" mode=""></image>
						<view class="spec_shopInfo">
							<span>¥{{specList.price}}</span>
							<p>编号：1000320203</p>
						</view>
						<view class="spec_close" @click="_specClose">×</view>
					</view>
					<!-- 规格循环↓ -->
					<view class="spec_option" v-for="(item,index) in specList.parameter" :key="index">
						<view class="spec_title">{{item.specifs}}</view>
						<view class="spec_item">
							<span v-for="(item1,index1) in item.child" :key="index1" @click="_clicSpec(item1,index)" :class="{specActive: item1.checked}">{{item1.specif}}</span>
						</view>
					</view>

					<!-- 数量 -->
					<!-- <view class="spec_shopNum">
						数量
						<view class="shopNum_oper">
							<span>-</span>
							<span class="shopNum">1</span>
							<span>+</span>
						</view>
					</view> -->

					<!-- 加入清单按钮 -->
					<view class="spec_joinBtn" @click="toChangeSpec">确定</view>
				</view>
			</view>
		</view>

		<view v-if="!powerRemove">
			<!-- 用户购买 -->
			<view :class="is_change==false?'gL_userNo':'gL_userOk'" @click="_toUserPay" v-if="type">
				<view class='gL_userPurch'>
					<view class="iconfont icon-zhuanfa"></view>
					用户购买
				</view>
			</view>

			<!-- 全选与优惠（未操作） -->
			<view class="gL_allCheck" v-if="!is_change">
				<view class="gL_allCheckBtn">
					<view class="gL_allLeft">
						<checkbox-group v-if="powerRemove" @change="_lastAllCheck">
							<label>
								<checkbox :checked="lastAllChecked" /><text>全选</text>
							</label>
						</checkbox-group>
						<span>合计：¥{{allPrice}}</span>
					</view>
					<view class="gL_allRight" @click="_generList">
						<view class="iconfont icon-youhuiyingxiao"></view>
						优惠
					</view>
				</view>
			</view>

			<!-- 全选与优惠（已操作） -->
			<view class="gL_allCheckOk" v-else>
				<view class="gL_allCheckBtn">
					<view class="gL_allLeft">
						<text>合计：¥{{primary_price}}</text>
						<span>优惠：¥{{coupon_price}}</span>
						<text>实付：¥{{needPrice}}</text>
					</view>
					<view class="gL_allRightBtn">
						<view class="gL_allRight" :style="root==false?'width:188rpx':'width:168rpx'" @click="_openShadow">
							<view class="iconfont icon-youhuiyingxiao" :style="root==false?'margin:0 6rpx 0 16rpx':'margin:0 6rpx 0 34rpx'"></view>
							{{root==false?'再次优惠':'优惠'}}
						</view>
						<button class="gL_allRight gL_allRight2" v-if="root&&type==false" @click="_toNotRootFor" open-type="share">
							<view class="iconfont icon-zhuanfa2"></view>
							转发
						</button>
					</view>

				</view>
			</view>

			<!-- 优惠操作 -->
			<view class="gL_preferShadow" v-if="openShadow">
				<view class="gL_preferOpen">
					<view class="gL_preferTop">
						<view></view>
						<view class="gL_preferTit">
							<span></span>
							<h2>优惠</h2>
							<span></span>
						</view>
						<view class="gL_preferClose" @click="_closeShadow">×</view>
					</view>
					<!-- 、、、、、、无权限、、、、、、- -->
					<view class="gL_notRoot" v-if="!root">
						<image :src="QRimg" mode=""></image>
						<view class="gL_notRootTop">
							您暂无调价权限
							<p>请联系您的主管进行调价</p>
						</view>
						<button class="gL_forwardBtn" @click="_forwarRoot" open-type="share">
								<view class="iconfont icon-zhuanfa2"></view>
								转发
						</button>
						<view class="btnShadow" v-if="!notRootShadow"></view>
					</view>
					<!-- 、、、、、、 -->

					<!-- 、、、、、有权限 、、、、、-->
					<view v-else>
						<view class="gL_preferPrice">
							<view class="gL_origPrice">
								<view>
									原价<span>￥{{primary_price}}</span>
								</view>
								<view>
									底价<span>￥{{rate_price}}</span>
								</view>
							</view>
							<view class="gL_adjustPrice">优惠金额</view>
							<view class="gL_input">
								<input type="digit" v-model="changePrice" value="" :placeholder='priceData' />
							</view>
						</view>
						<view class="gL_confirmBtn" @click="_toOk">
							确认按钮
						</view>
					</view>
					<!-- 、、、、、、 -->
				</view>
			</view>

			<!-- 二维码遮罩 -->
			<view class="gL_forwardQR" v-if="QRstatus">
				<view class="QRshadow" @click="_toCloseQR"></view>
				<view class="gL_QRimg">
					<image :src="QRimg" mode=""></image>
				</view>
				<view class="gL_QRbtn">
					<!-- #ifdef MP-WEIXIN -->
					<button class="QRbtn" @click="toUserMini">
						<view class="btnImg1">
							<view class="iconfont icon-friend"></view>
						</view>
						<p>分享链接</p>
					</button>
					<!-- #endif -->
					<view class="QRbtn" @click="_toSaveQrImg">
						<view class="btnImg2">
							<view class="iconfont icon-erweima"></view>
						</view>
						<p>保存二维码</p>
					</view>
					<view class="shadowNot" v-if="!payShadow"></view>
				</view>
			</view>
		</view>

		<!-- 管理 一键删除 -->
		<view class="gL_allCheck" v-else>
			<view class="gL_allCheckBtn">
				<view class="gL_allLeft">
					<checkbox-group @change="_lastAllCheck">
						<label>
							<checkbox :checked="lastAllChecked" /><text>全选</text>
						</label>
					</checkbox-group>
				</view>
				<view class="gL_allRight gL_allRemove" @click="_toRemove">
					删除
				</view>
			</view>
		</view>
		
		<!-- /遮罩是否确认删除 -->
		<view class="mE_btnShadow" v-if="openDel">
			<view class="mE_btnContent">
				<h2>温馨提示</h2>
				<h3>确定要删除这些商品吗!</h3>
				<view class="mE_btn">
					<view @click="_cancelFn">取消</view>
					<view @click="_deterFn" class="mE_btn2">确认</view>
				</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	import navBar from '@/components/navBar/navBar.vue';
	import service_mall from '@/service/mall.js'
	export default {
		components: {
			navBar
		},
		data() {
			return {
				// 商品列表
				shopList: [],
				sku_id:null, //
				id:null,//清单列表id
				
				userName:null, //导购名称
				headImg:'',
				// 规格列表
				specList: [],

				//二维码图片
				QRimg: null, //转发的二维码
				path:null, //转发的路径
				
				
				openDel:false,  //删除弹框
				storeNum:[], //店铺数量
				
				root: false, //是否有调价权限
				rootPower:false, //权限输入弹出
				openShadow: false, //是否点击优惠
				lastAllChecked: false, //最终的全选按钮

				toNotRootFor: false, //转发给无权限

				forwardOffer: false, //是否是转发修改优惠
				// userPurc:false,//是否点击用户购买
				QRstatus: false, //是否打开二维码分享
				specShadow: false, //规格弹框
				powerRemove: false, //管理按钮
				generList:false,  //是否生成清单
				

				changePrice: '', //输入的优惠价格
				
				delItem:[],  //要删除的商品
				sku_id:[],  //要删除的商品的sku_id
				specIndex: 0,
				specIndex1: 0,
				IphoneBottom: 0,
				primary_price:0,//原价
				rate_price:0,   //底价
				now_coupon_price:0, // 当前优惠金额
				needPrice:0,//实付金额
				coupon_price:0, //优惠金额
				single_id:null, //清单id
				priceData:'请输入',
				is_change:false, //是否已优惠
				
				nowNum:null, //商品当前数量
				type:null, //是否是本导购清单
				is_status:null,  //是否下单
				payStatus:true, //转发用户支付标识
				guide_name:null, //转发后的来源导购名称
				guide_root:false,  //导购权限
				admin_root:false,  //平台管理权限
				payShadow:false, //用户支付分享按钮等二维码图片加载完才能操作
				notRootShadow:false, //优惠无权限时加载二维码的按钮遮罩操作
			}
		},
		onLoad(options) {
			// #ifdef MP-WEIXIN
				wx.hideShareMenu()
			// #endif
			this.root = false
			// console.log(options)
			// const scene = decodeURIComponent(options.scene) //二维码扫码时的参数
			
			// console.log(scene,'scene')
			// console.log(options,'options')
			// this.single_id = scene.single_id?scene.single_id:options.single_id
			// console.log(this.single_id)
			
			let scene= decodeURIComponent(options.scene) //二维码扫码时的参数
			console.log(scene,'二维码参数')
			console.log(options,'转发时参数')
			scene = scene.split("&");
			let obj = {}
			let app = getApp()
			for(let i = 0;i<scene.length;i++){
				let newscene = scene[i].split("=");
				obj[newscene[0]] = newscene[1];
			}
			if(obj.single_id){
				this.single_id = obj.single_id
			}else {
				this.single_id = options.single_id
			}
		
			// this.get_guideRole();
			// this.getRoot();
			let token = this.$store.state.index.token;
			console.log(token)
			console.log(this.forwardOffer)
			if(!token){
				uni.setStorageSync('single_id',this.single_id)
				uni.redirectTo({
					url: '/pages_login/pages/login/login/index',
				});
			}else{
				// this.getGuideRoot()
				// this.getAdminRoot()
				let router = this.$store.state.index.page?this.$store.state.index.page.ability:[]
				
				if(router.findIndex(item=>item.route == 'guideAllChange')!=-1){
					this.admin_root = true
				}
				if(router.findIndex(item=>item.route == 'guideChange')!=-1){
					this.guide_root = true
				}
				this.getGuideList();
			}
			
		},
		onShow() {
			
		},
		computed:{
			// 总数
			allNum(){
				let allNum = 0
				this.shopList.map(item=>{
					item.medical_list.map(item1=>{
						allNum += item1.cart_num;
					})
				})
				return allNum
			},
			
			// 总价
			allPrice(){
				let allPrice = 0
				this.shopList.map(item=>{
					item.medical_list.map(item1=>{
						allPrice += Number(item1.price) * item1.cart_num;
					})
				})
				return allPrice.toFixed(2)
			}
		},

		methods: {
			// 获取生成的所以清单
			// getAllList(){
			// 	service_mall.getGenerOkList().then(res=>{
			// 		console.log(res)
			// 	})
			// },
			
			// 前往用户端支付
			// toOtherMini(){
			// 	uni.navigateToMiniProgram({
			// 		appId: 'wx66230223cee807f1',// 其他小程序APPID
			// 		envVersion:'trial',
			// 		path: `/pages_mall/pages/mall/userPay/userPay?single_id=${this.single_id}`,//其他小程序地址
			// 		success: res => {
			// 			// 打开成功
			// 			console.log("打开成功", res);
			// 		},
			// 		fail: err => {
			// 			console.log('打开失败')
			// 		}
			// 	});
			// },
			
			// 获取生成清单详情
			async getGuideList(){
				
				let res = await service_mall.getGenerList({single_id:this.single_id})
					console.log(res,'生成的清单详情')
					if(res.code==1){
						res.data.list.map(item=>{
							item.checked = false;
							item.medical_list.map(item1=>{
								item1.checked = false
							})
						})
						let router = this.$store.state.index.page?this.$store.state.index.page.ability:[]
						
						if(router.findIndex(item=>item.route == 'guideAllChange')!=-1){
							this.admin_root = true
						}
						if(router.findIndex(item=>item.route == 'guideChange')!=-1){
							this.guide_root = true
						}
						console.log(this.guide_root,'hhhhhhhh')
						console.log(router,'jjjjjjj')
						// 是否有权限改价
						if(this.admin_root){
							this.root = true
						}else{
							let role = this.$store.state.index.role
							if(role!='shop' && this.guide_root){
								this.root = true
							}else{
								// 判断是否本店铺清单（赋予改价权）
								let store_id = this.$store.state.index.sid
								let rootStatus = res.data.list.every(item=>item.store_id==store_id)
								console.log(rootStatus,'是否本导购')
								if(rootStatus && this.guide_root){
									this.root = true
								}else{
									this.root = false
								}
							}
							
							// if(this.guide_root){
							// 	let store_id = this.$store.state.index.sid
							// 	let role = this.$store.state.index.role
							// 	if(role =='shop'){
							// 		let rootStatus = res.data.list.every(item=>item.store_id==store_id)
									
							// 	}
							// }
							
						}
						console.log(this.root,'改价权限')
						
						let data = res.data
						this.shopList = data.list?data.list:[];
						// console.log(data.list.length)
						this.primary_price = data.primary_price;  //原价
						this.coupon_price = data.coupon_price;  //已优惠金额
						this.needPrice = data.price;   // 实付价格
						this.userName = data.user_name;
						this.headImg = data.headimg;
						this.type = data.type==1?true:false;
						let allRatePrice = 0
						data.list.map(item=>{
							item.medical_list.map(item1=>{
								allRatePrice += Number(item1.rate_price)*Number(item1.cart_num)
							})
						})
						this.rate_price = allRatePrice.toFixed(2)
						this.forwardOffer = data.is_share==1?true:false;
						this.is_change = data.is_change==1?true:false;
						this.is_status = data.state==1?true:false;
						let canPrice = (Number(this.primary_price)-Number(this.rate_price)).toFixed(2) //优惠金额区间
						this.priceData = `请输入0-${canPrice}之间`
						let list_length = data.list.length
					}
			},
			
			
			// async getGuideRoot(){ //获取导购权限
			// 	let res = await service_mall.getChangeRoot({single_id:this.single_id})
			// 		console.log(res,'导购改价权限')
			// 		if(res.code==1){
			// 			this.guide_root = res.data.auth==1?true:false;
			// 		}
			// },
			
			// async getAdminRoot(){ //获取平台管理权限
			// 	let res = await service_mall.getAdminRoot()
			// 		console.log(res,'平台改价权限')
			// 		if(res.code==1){
			// 			this.admin_root = res.data.change==1?true:false
			// 		}
			// },
			
			
		
			
			// 获取商品详情
			getShopDetail(product_id){
				service_mall.goods_getDetail({product_id}).then(res=>{
					// console.log(res)
					if(res.code==1){
						this.specList = res.data
					}
				})
			},
			// 点击列表中的商品规格
			_choiceSpec(item){
				this.specShadow = true
				this.id = item.id
				console.log(this.id)
				console.log(item)
				this.specShopImg = item.main_imgurl
				this.getShopDetail(item.product_id)
				
			},
			
			// 点击规格中的选项
			_clicSpec(data,index1) {
				if(data.checked){
					this.$set(data,"checked",false)
				}else{
					this.specList.parameter[index1].child.map(item=>{
						this.$set(item,"checked",false)
					})
					this.$set(data,"checked",true)
					this.get_keys()
				}
			},
			get_keys(){
				let keys = [];
				this.specList.parameter.map((item1,index1)=>{
					let checkedItem = item1.child.find(r=>r.checked)
					if(checkedItem){
						keys.push({
							key:item1.specifs,
							value:checkedItem.specif
						})
					}
				})
				this.keys = keys
				let sku_lst = this.specList.sku_lst
				for(let i = 0;i<sku_lst.length; i++){
						if(JSON.stringify(sku_lst[i].attribute) == JSON.stringify(keys)){
							this.sku_id= sku_lst[i].sku_id
							this.specList.price = sku_lst[i].price
							this.specList.primary_price = sku_lst[i].primary_price
							this.specList.stockNum = sku_lst[i].num
						}
				}	
			},
			
			
			// 更改规格
			toChangeSpec(){
				if(this.is_change){
					uni.showToast({
						title:'清单已优惠-不可更改',
						icon:'none'
					})
					return
				}
				if(this.specList.specs_type == 1 && this.specList.sku_lst.length>0){//单
					this.sku_id = this.specList.sku_lst[0].sku_id
				}
				if(this.specList.specs_type == 2 && !this.sku_id){
					uni.showToast({
					    title: '请选择规格',
						icon: 'none',
					    duration: 2000
					});
					return
				}
				
					console.log(this.sku_id)
					console.log(this.specList)
					console.log(this.id)
					service_mall.changeGuideSpec({sku_id:this.sku_id,id:this.id}).then(res=>{
					if(res.code==1){
						this.getGuideList()
						this.specShadow = false
					}else{
						uni.showToast({
							title:res.msg,
							icon:'none'
						})
					}
				})
			},
			
			
			
			//点击进入店铺
			_toShopRoom(store_id) {
				uni.navigateTo({
					url: `/pages/mall/store/store?storeId=${store_id}`
				})
			},

			_getStytemInfo() {
				let isIphoneX = App.globalData.isIphoneX;
				if (isIphoneX) {
					this.IphoneBottom = 68
				}
			},

			//改完价后的确认按钮
			_toOk() {
				if (this.changePrice !== '') {
					service_mall.changePrice({favour_price:this.changePrice,single_id:this.single_id}).then(res=>{
						console.log(res)
						if(res.code == 1){
							this.openShadow = false
							this.getGuideList();
							// this.coupon_price = this.changePrice
							uni.showToast({
								title:'优惠成功',
								icon:'success'
							})
							this.changePrice = ''
						}else{
							uni.showToast({
								title:res.msg,
								icon:'none'
							})
						}
					})
					
				}
			},
			
			// 改完价后的优惠或再次优惠
			_openShadow(){
				if(this.is_change){
					uni.showModal({
					    title: '确定要修改清单吗？',
					    content: '若修改清单商品，现有优惠将作废！',
					    success:  (res) => {
					        if (res.confirm) {
								this.openShadow = true
								if(!this.root){ //无权限时生成二维码
									this.toGenerate()
								}
					        }else if (res.cancel) {
					           this.openShadow = false
					        }
					    }
					});
				}else{
					this.openShadow = true
				}
			},

			//无权限转发
			_forwarRoot() {
				
				// this.forwardOffer = true
				// this.openShadow = false
				
			},

			//改完价后转发
			_toNotRootFor() {
				
				// this.root = false
				// this.forwardOffer = false
				// this.toNotRootFor = true
			},

			//点击管理按钮
			_toManage() {
				if (this.powerRemove) {
					this.powerRemove = false
				} else {
					this.powerRemove = true
				}
			},
			// 点击添加商品按钮
			_toAddShop(){
				if(this.is_change){
					uni.showToast({
						title:'清单已优惠-不可添加',
						icon:'none'
					})
					return
				}
				let addType = true
				let storeId = this.shopList[0].store_id
				uni.navigateTo({
					url:'./generList?addType='+ addType +'&single_id='+this.single_id+'&store_id='+storeId
				})
			},

			//点击单个商品进入商品详情
			_toGuideDetail(product_id) {
				uni.navigateTo({
					url: `/pages/mall/goods/goods?id=${product_id}`
				})
			},

			//点击优惠
			_generList() {
				this.openShadow = true
				console.log(this.root)
				if(!this.root){
					this.toGenerate()
				}
			},
			
			// 如果没有权限生成二维码
			toGenerate(){
				uni.showLoading({
					title:'加载中...'
				})
				service_mall.share_Qr({single_id:this.single_id}).then(res=>{
					console.log(res)
					if(res.code==1){
						this.QRimg = res.data.code
						this.path = `/pagesGuide/shopGuide/guideList/guideList?single_id=${this.single_id}&guide_name=${this.userName}`
						uni.hideLoading()
						this.notRootShadow = true
					}
				})
			},

			//点击优惠输入框的x
			_closeShadow() {
				this.openShadow = false
			},
			
			// 点击弹出框的确定
			_deterFn(){
				let id = this.delItem.join(',')
				let sku_id = this.sku_id.join(',')
				let user_id = this.$store.state.index.userId;
				service_mall.delGuideList({single_id:this.single_id,sku_id,user_id}).then(res=>{
					console.log(res)
					if(res.code==1){
						this.getGuideList()
						uni.showToast({title:'删除成功',icon:'success'})
						this.openDel = false
					}else{uni.showToast({title:res.msg,icon:'none'})}
				})
			},
			
			// 点击弹出框的取消
			_cancelFn(){
				this.openDel = false
			},
			
			// 管理删除按钮
			_toRemove(){
				let arr = []
				let skuId = []
				 this.shopList.map(item=>{
					 let k = item.medical_list.find(item1=>{
						if(item1.checked==true){
							arr.push(item1.id)
							skuId.push(item1.sku_id)
						}
					})
				})
				console.log(arr)
				console.log(skuId)
				this.delItem = arr
				this.sku_id = skuId
				if(arr.length){
						this.openDel = true
					}else{
					uni.showToast({
						title:'请勾选要删除的项',
						icon:'none'
					})
				}
			},

			//点击店铺内的全选
			_shopRoomAllCheck(index) {
				if (this.shopList[index].checked) {
					this.shopList[index].checked = false
				} else {
					this.shopList[index].checked = true
				}
				console.log(this.shopList[index].checked)
				this.shopList[index].medical_list.map(item => item.checked = this.shopList[index].checked)
				this._seeCheck()
			},

			//点击商品的单个选中
			_shopCheck(index, index1) {
				console.log(index,index1)
				if (this.shopList[index].medical_list[index1].checked) {
					this.shopList[index].medical_list[index1].checked = false
				} else {
					this.shopList[index].medical_list[index1].checked = true
				}
				console.log(this.shopList[index].medical_list[index1].checked)
				//每点击一次单个都看一遍所有的checked
				let shopCheck = this.shopList[index].medical_list.every(item => item.checked)
				console.log(shopCheck)
				this.shopList[index].checked = shopCheck
				console.log(this.shopList[index].checked)
				this._seeCheck()
			},

			
			//规格弹框中的x
			_specClose() {
				this.specShadow = false
			},


			//最终的全选按钮
			_lastAllCheck() {
				if (this.lastAllChecked) {
					this.lastAllChecked = false
				} else {
					this.lastAllChecked = true
				}
				this.shopList.map(item => {
					item.checked = this.lastAllChecked;
					item.medical_list.map(item1 => {
						item1.checked = this.lastAllChecked
					})
				})
			},

			//每次点一个都看一遍所有的checked状态
			_seeCheck() {
				this.shopList.every(item => this.lastAllChecked = item.checked)
			},

			//点击减号
			_reduceNum(item) {
				if(!item.sku_id){
					uni.showToast({
						title:'当前规格已下架，请重新选择',
						icon:'none'
					})
					return
				}
				if(this.is_change){
					uni.showToast({
						title:'清单已优惠-不可更改',
						icon:'none'
					})
					return
				}
				let sku_id = item.sku_id
				if(item.cart_num>1){
					this.toaddOrReduce(sku_id,2)
				}else{
					uni.showModal({
					    title: '提示',
					    content: '确认删除该商品?',
					    success:  (res) => {
					        if (res.confirm) {
								service_mall.delGuideList({single_id:this.single_id,sku_id}).then(res=>{
									console.log(res)
									if(res.code==1){
										this.getGuideList()
										uni.showToast({title:'删除成功',icon:'success'})
										this.openDel = false
									}else{uni.showToast({title:res.msg,icon:'none'})}
								})
					        } else if (res.cancel) {
								
					        }
					    }
					});
				}
			},

			//点击加号
			_addNum(item) {
				if(!item.sku_id){
					uni.showToast({
						title:'当前规格已下架，请重新选择',
						icon:'none'
					})
					return
				}
				if(this.is_change){
					uni.showToast({
						title:'清单已优惠-不可更改',
						icon:'none'
					})
					return
				}
				console.log(item)
				let sku_id = item.sku_id
				this.nowNum = item.cart_num
				this.nowNum++
				if(this.nowNum>item.num){
					uni.showToast({ title: '库存不足', icon: 'none' })
					return
				}
				this.toaddOrReduce(sku_id,1)
			},
			toaddOrReduce(sku_id,opera_type){
				service_mall.addOrReduce({single_id:this.single_id,sku_id,num:1,opera_type}).then(res=>{
					if(res.code==1){
						console.log(res)
						this.getGuideList()
					}else{uni.showToast({title:res.msg,icon:'none'})}
				})
			},
			
			// 用户支付分享链接
			toUserMini(){
				console.log(this.single_id,'管理端准备传的single_id---')
				uni.navigateToMiniProgram({
					appId: 'wx66230223cee807f1',// 其他小程序APPID
					envVersion:'release',
					path: `/pages_mall/pages/mall/userPay/userPay`,//其他小程序地址
					extraData:{
						single_id:this.single_id,
					},
					success: res => {
						// 打开成功
						console.log("打开成功", res);
					},
					fail: err => {
						console.log('打开失败')
					}
				});
			},

			//打开二维码分享（用户支付）
			async _toUserPay() {
				uni.showLoading({
					title:'加载中...'
				})
				this.QRstatus = true
				let res = await service_mall.toShare_userQr({single_id:this.single_id})
					console.log(res,'用户支付二维码')
					if(res.code==1){
						this.QRimg = res.data.code,
						// this.path = `/pages/shopGuide/guideList/toOtherMini?single_id=${this.single_id}`
						uni.hideLoading()
						this.payShadow = true
					}
				console.log(this.path)
			},
			_toCloseQR() {
				this.QRstatus = false

			},

			// 点击保存二维码
			_toSaveQrImg() {
				//获取相册授权
				let that = this
				uni.getSetting({
					success: (res) => {
						// console.log(res)
						// 用户还未授权
						if (!res.authSetting['scope.writePhotosAlbum']) {
							uni.authorize({
								scope: 'scope.writePhotosAlbum',
								success: (res) => {
									//用户同意授权
									console.log('2222')
									console.log(res)
									that._saveImg()
									// console.log(res)
								}
							})
						} else { //用户已经授权过了
						console.log('1111')
							that._saveImg()
						}
					}
				})
			},

			_saveImg() {
				uni.showLoading({
					title:'保存中...'
				})
				console.log(this.QRimg,'tup')
				uni.downloadFile({
					url:this.QRimg, 
					success: (res) => {
						console.log(res,'111')
			        if (res.statusCode === 200) {
			                let file = res.tempFilePath;
							console.log(file,'0000')
							uni.saveImageToPhotosAlbum({
								filePath: file,
								success: function(res2) {
									uni.showToast({
										title: '保存成功',
										icon:"success"
									})
								},
								fail: function(err) {
									// console.log(err.errMsg);
									uni.showToast({
										title: '保存失败',
										icon:"none"
									})
								}
							})
			            }
			        }
			    });
				uni.hideLoading()
			},
			// 点击5d
			_toFiveD() {
				console.log('5d')
			}
		},
		
		
		// 点击分享链接
		onShareAppMessage(res) {
			console.log(res)
			console.log(this.path)
			if (res.from === 'button') {// 来自页面内分享按钮
				console.log(res.target)
			}
			return {
				title: '融易装',
				path: this.path,
				imageUrl:this.$static + '/static/adminShop/shareImg.png',
			}
		},
	}
</script>

<style lang="scss" scoped>
	
	.guideList {
		position: relative;
		margin-bottom: 162rpx;
		padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
		padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/

		.gL_topNum {
			width: 100%;
			background-color: #fff;
			height: 58rpx;
			padding: 0rpx 36rpx;
			font: 500 24rpx/58rpx PingFang SC;
			color: #787878;
			display: flex;
			justify-content: space-between;

			span {
				color: #1A1C20;
				font-weight: 600;
				margin-left: 40rpx;
			}

			.comeWhere {
				display: flex;
				align-items: center;

				image {
					width: 42rpx;
					height: 42rpx;
				}

				.comeWhereInfo {
					font: 500 24rpx/34rpx PingFang SC;
					color: #333;
					margin-left: 8rpx;

					span {
						color: #E9423E;
					}
				}
			}
		}

		// 店铺商品列表
		.gL_shopList {
			background-color: #fff;
			margin-top: 16rpx;

			.gL_shopRoom {
				width: 100%;
				height: 100rpx;
				display: flex;
				align-items: center;
				justify-content: space-between;
				padding: 0 32rpx 0 36rpx;
				border-bottom: 2rpx solid rgba(0, 0, 0, 0.08);

				.gL_roomTit {
					width: 100%;
					font: 500 28rpx/40rpx PingFang SC;
					color: #1A1C20;
					display: flex;
					align-items: center;

					.gL_roomImg {
						width: 50rpx;
						height: 50rpx;
						background-color: #F6F7FB;
						border-radius: 50%;
						margin: 0 16rpx 0 40rpx;
						padding: 8rpx 8rpx;

						image {
							width: 34rpx;
							height: 34rpx;
						}
					}

					.gL_roomInfo {
						p {
							font: 400 22rpx/32rpx PingFang SC;
							color: #A0A0A0;
						}
					}

				}

				.gL_goRoomInfo {
					display: flex;
					align-items: center;

					.gL_goRoom {
						width: 122rpx;
						height: 44rpx;
						border: 2rpx solid #E7DEC8;
						border-radius: 22rpx;
						color: #CBAF87;
						text-align: center;
						font: 500 22rpx/42rpx PingFang SC;
					}

					.roomMap {
						view {
							font-size: 22rpx;
						}

						width: 76rpx;
						margin-left: 16rpx;
					}
				}
			}

			//商品详情列表 
			.gL_allShopList {
				padding-left: 36rpx;
				// height: calc(104rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
				// height: calc(104rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
			

				.gL_border {
					width: 100%;
					height: 0;
					border-top: 2rpx solid #000;
					opacity: 0.08;
				}

				.gL_allShopItem {
					width: 100%;
					height: 252rpx;
					display: flex;
					flex-direction: column;
					padding: 24rpx 24rpx 0 0rpx;

					.gL_allItemTop {
						display: flex;
						align-items: center;

						.gL_shopImg {
							position: relative;
							margin: 0 16rpx 0 40rpx;

							image {
								width: 150rpx;
								height: 150rpx;
							}

							.gL_shop5D {
								.gL_5Dicon {
									font-size: 18rpx;
									height: 24rpx;
								}

								padding: 6rpx 0;
								width: 64rpx;
								height: 64rpx;
								border-radius: 50%;
								position: absolute;
								top: 0;
								bottom: 0;
								left: 0;
								right: 0;
								margin:auto;
								background-color: rgba(0, 0, 0, 0.2);
								border: 2rpx solid rgba(255, 255, 255, 0.2);
								color: #fff;
								display: flex;
								flex-direction: column;
								align-items: center;
								font: 400 18rpx/32rpx PingFang SC;
							}
						}

						.gL_shopInfo {
							display: flex;
							flex-direction: column;
							color: #1A1C20;
							font: 500 30rpx/40rpx PingFang SC;

							.gL_title {
								width: 448rpx;
								padding-right: 32rpx;
							}

							.gL_spec {
								display: flex;
								align-items: center;
								max-width: 350rpx;
								height: 44rpx;
								padding: 0 18rpx 0 14rpx;
								background-color: #F9F6F3;
								justify-content: space-between;
								color: #939393;
								margin: 18rpx 0 16rpx 0;

								view {
									font: 400 24rpx/44rpx PingFang SC;
								}
								.specList{
									width: 298rpx;
								}
							}

							.price {
								color: #EF5854;
								font-weight: bold;
							}
						}
					}

					.gL_allItemBottom {
						width: 100%;
						height: 42rpx;
						display: flex;
						align-items: center;
						justify-content: flex-end;
						font: 600 34rpx/42rpx PingFang SC;
						margin-left: auto;

						.gL_ShopNum {
							width: 72rpx;
							height: 42rpx;
							background-color: #F6F7FB;
							border-radius: 8rpx;
							text-align: center;
							// margin: 0 24rpx;
						}

						// span {
						// 	width: 72rpx;
						// 	text-align: center;
						// }
						.gL_minus, .gL_add {width: 72rpx;height: 42rpx;position: relative;}
						.gL_minus::before, .gL_add::before, .gL_add::after {content: "";width: 24rpx;height: 4rpx;border-radius: 4rpx;background: #333;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);}
						.gL_add::after {width: 4rpx;height: 24rpx;}
					}
				}
			}
		}

		// 规格弹框
		.gL_specShadow {
			width: 100%;
			height: 100%;
			position: fixed;
			top: 0;
			left: 0;
			background-color: rgba(0, 0, 0, .8);
			z-index: 502;

			.gL_specInfo {
				width: 100%;
				position: absolute;
				left: 0;
				bottom: 0;
				background-color: #fff;
				border-radius: 24rpx 24rpx 0 0;
				padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
				padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/

				.gL_specInfoTop {
					padding: 36rpx 32rpx 10rpx;
				}

				.spec_shop {
					display: flex;
					margin-bottom: 40rpx;

					image {
						width: 178rpx;
						height: 178rpx;
						box-shadow: 0rpx 2rpx 2rpx rgba(136, 136, 136, 0.16);
					}

					.spec_shopInfo {
						display: flex;
						flex-direction: column;
						justify-content: space-between;
						margin-left: 16rpx;
						padding-top: 32rpx;
						font: 400 22rpx/28rpx PingFang SC;
						color: #939393;

						span {
							color: #E9423E;
							font: 600 34rpx/44rpx PingFangSC-Semibold;
						}
					}

					.spec_close {
						width: 41rpx;
						height: 41rpx;
						background-color: #F9F6F3;
						border-radius: 50%;
						text-align: center;
						line-height: 41rpx;
						margin-left: auto;
					}
				}

				.spec_option {
					margin-bottom: 24rpx;

					.spec_title {
						font: 600 28rpx/40rpx PingFang SC;
						color: #1A1C20;
					}

					.spec_item {
						display: flex;
						align-items: center;
						margin-top: 24rpx;
						flex-wrap: wrap;

						span {
							padding: 4rpx 24rpx;
							font: 400 24rpx/34rpx PingFang SC;
							color: #939393;
							text-align: center;
							background-color: #F5F5F5;
							border-radius: 22rpx;
							margin: 0 16rpx 16rpx 0;
						}

						.specActive {
							background-color: #FEEFF2;
							color: #E9423E;
						}
					}
				}

				// 数量
				.spec_shopNum {
					display: flex;
					justify-content: space-between;
					align-items: center;
					margin-top: 4rpx;

					.shopNum_oper {
						display: flex;
						font: 600 34rpx/42rpx PingFang SC;
						align-items: center;

						span {
							width: 72rpx;
							height: 46rpx;
							text-align: center;
						}

						.shopNum {
							background-color: #F6F7FB;
							border-radius: 10rpx;
						}
					}
				}

				// 加入清单按钮
				.spec_joinBtn {
					width: 656rpx;
					height: 72rpx;
					background-color: #C3AB7C;
					border-radius: 8rpx;
					margin: 172rpx auto 0;
					text-align: center;
					font: 500 28rpx/72rpx PingFang SC;
					color: #fff;
				}

			}
		}


		// 用户购买

		.gL_userNo {
			position: fixed;
			bottom: 182rpx;
			right: 32rpx;
			height: calc(104rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
			height: calc(104rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
			padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
			padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
		}

		.gL_userOk {
			position: fixed;
			bottom: 280rpx;
			right: 32rpx;
			height: calc(104rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
			height: calc(104rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
			padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
			padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
		}

		.gL_userPurch {
			width: 104rpx;
			height: 104rpx;
			border-radius: 50%;
			background-color: rgba(0, 0, 0, 0.4);
			border: 2rpx solid #C6B08C;
			display: flex;
			flex-direction: column;
			align-items: center;
			padding: 20rpx 0 20rpx 0;

			view {
				width: 38rpx;
				height: 38rpx;
				font-size: 38rpx;
			}

			font: 400 18rpx/26rpx PingFang SC;
			color: #fff;
		}

		//二维码遮罩
		.gL_forwardQR {
			width: 100%;
			height: 100%;
			position: fixed;
			left: 0;
			top: 0;
			z-index: 501;

			.QRshadow {
				width: 100%;
				height: 100%;
				background-color: rgba(0, 0, 0, 0.6);
			}

			.gL_QRimg {
				width: 612rpx;
				height: 612rpx;
				background-color: #fff;
				border-radius: 16rpx;
				position: absolute;
				top: 0;
				left: 0;
				right: 0;
				bottom: 0;
				margin: auto;
				transform: translateY(-150rpx);

				image {
					width: 504rpx;
					height: 504rpx;
				}

				padding: 62rpx 54rpx;

				p {
					text-align: center;
					font: 500 24rpx/34rpx PingFang SC;
					color: #333;
					margin-top: 26rpx;
				}
			}
			
			.shadowNot{
				width: 100%;
				height: 100%;
				background-color: transparent;
				position: absolute;
				top: 0;
				left: 0;
				z-index: 10;
			}

			.gL_QRbtn {
				width: 100%;
				// height: 338rpx;
				background-color: #fff;
				position: absolute;
				left: 0;
				bottom: 0;
				border-radius: 8px 8px 0px 0px;
				padding: 100rpx 148rpx 100rpx 148rpx;
				height: calc(338rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
				height: calc(338rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
				padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
				padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
				display: flex;
				justify-content: space-between;

				.QRbtn {
					display: flex;
					background-color: rgba(0, 0, 0, 0);
					flex-direction: column;
					align-items: center;
					padding: 0;
					margin: 0;
					font: 500 24rpx/44rpx PingFang SC;
					color: #939393;

					p {
						margin-top: 16rpx;
					}

					.btnImg1 {
						width: 72rpx;
						height: 72rpx;
						position: relative;
						border-radius: 50%;
						background-color: rgb(139, 195, 122);

						view {
							font-size: 42rpx;
							color: #fff;
							position: absolute;
							top: 16rpx;
							left: 16rpx;
						}
					}

					.btnImg2 {
						width: 72rpx;
						height: 72rpx;
						border-radius: 50%;
						position: relative;
						background-color: rgb(203, 175, 135);

						view {
							font-size: 42rpx;
							color: #fff;
							position: absolute;
							top: 16rpx;
							left: 16rpx;
						}
					}
				}
			}
		}


		// 全选与优惠（未操作）
		.gL_allCheck {
			width: 100%;
			// height: 146rpx;
			position: fixed;
			bottom: 0rpx;
			height: calc(146rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
			height: calc(146rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
			padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
			padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
			background-color: #fff;

			.gL_allCheckBtn {
				width: 686rpx;
				height: 136rpx;
				border-radius: 8rpx;
				background-color: #1A1C20;
				margin: 0 auto;
				padding: 0 36rpx 0 40rpx;
				display: flex;
				justify-content: space-between;
				align-items: center;
				color: #fff;

				.gL_allLeft {
					display: flex;
					align-items: center;

					checkbox {
						width: 46rpx;
					}

					label {
						font: 400 26rpx/36rpx PingFang SC;
						display: flex;
						flex-direction: column;
						align-items: center;
						text{margin-top: 10rpx;}
					}

					span {
						font: 400 34rpx/48rpx PingFang SC;
						// margin-right: 10rpx;
					}
				}

				.gL_allRight {
					display: flex;
					align-items: center;
					border-radius: 8rpx;
					font: 400 28rpx/40rpx PingFang SC;
					// text-align: center;
					justify-content: center;
					view {
						margin: 0 6rpx 0 0rpx;
						font-size: 34rpx;
					}

					width: 168rpx;
					height: 70rpx;
					border:2rpx solid #FFFFFF;
					background-color: #CBAF87;

				}

				.gL_allRemove {
					justify-content: space-around;
				}
			}
		}

		// <!-- 全选与优惠（已操作） -->
		.gL_allCheckOk {
			width: 100%;
			// height: 244rpx;
			position: fixed;
			height: calc(244rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
			height: calc(244rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
			padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
			padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
			bottom: 0rpx;
			background-color: #fff;

			.gL_allCheckBtn {
				width: 686rpx;
				height: 234rpx;
				border-radius: 8rpx;
				background-color: #1A1C20;
				margin: 0 auto;
				padding: 34rpx 36rpx 32rpx 40rpx;
				display: flex;
				justify-content: space-between;
				align-items: center;

				.gL_allLeft {
					display: flex;
					flex-direction: column;
					font: 400 40rpx/56rpx PingFang SC;
					color: #fff;

					span {
						color: #E9423E;
					}
				}

				.gL_allRightBtn {
					display: flex;
					flex-direction: column;
					justify-content: space-between;

					view {
						font: 400 28rpx/40rpx PingFang SC;
					}

					.gL_allRight {
						display: flex;
						align-items: center;
						border-radius: 8rpx;

						view {
							margin: 0 6rpx 0 34rpx;
						}

						width: 168rpx;
						height: 70rpx;
						border:2rpx solid #FFFFFF;
						background-color: #CBAF87;
						color: #fff;
					}

					.gL_allRight2 {
						display: flex;
						view{margin: 0;margin-right: 6rpx;}
						align-items: center;
						justify-content: center;
						background-color: #E9423E;
						margin-top: 20rpx;
						font: 400 28rpx/40rpx PingFang SC;
					}
				}
			}
		}



		// 优惠操作
		.gL_preferShadow {
			width: 100%;
			height: 100%;
			background-color: rgba(0, 0, 0, 0.8);
			position: fixed;
			top: 0;
			left: 0;
			z-index: 502;

			.gL_preferOpen {
				width: 100%;
				// height: 742rpx;
				background-color: #fff;
				position: absolute;
				padding: 38rpx 32rpx;
				height: calc(742rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
				height: calc(742rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
				padding-bottom: constant(safe-area-inset-bottom);
				padding-bottom: env(safe-area-inset-bottom);
				bottom: 0;
				left: 0;
				border-radius: 24rpx 24rpx 0 0;

				.gL_preferTop {
					width: 100%;
					// height: 118rpx;
					display: flex;
					justify-content: space-between;
					align-items: center;
					font: 600 30rpx/40rpx PingFang SC;
					color: #000;

					view:first-child {
						width: 45rpx;
					}

					.gL_preferTit {
						display: flex;
						align-items: center;

						h2 {
							margin: 0 14rpx;
						}

						span {
							width: 46rpx;
							height: 0;
							border: 1rpx solid #c6c6c6;
						}
					}

					.gL_preferClose {
						width: 45rpx;
						height: 45rpx;
						border-radius: 50%;
						background-color: #F9F6F3;
						text-align: center;

					}
				}

				// 无权限
				.gL_notRoot {
					width: 100%;
					height: 100%;
					padding: 30rpx 0 60rpx 0;
					display: flex;
					flex-direction: column;
					justify-content: space-between;
					align-items: center;

					image {
						width: 320rpx;
						height: 320rpx;
					}

					.gL_notRootTop {
						text-align: center;
						margin: 0rpx auto;
						font: 400 22rpx/36rpx PingFang SC;
						color: #A0A0A0;

						p {
							padding-top: 14rpx;
						}
					}

					.gL_forwardBtn {
						width: 640rpx;
						height: 80rpx;
						margin: 0 auto;
						background-color: #E9423E;
						border-radius: 8rpx;
						color: #fff;
						font: 400 28rpx/40rpx PingFang SC;
						text-align: center;
						display: flex;
						align-items: center;
						justify-content: center;
						view {
							margin: 0 8rpx 0 0rpx;
							font-size: 28rpx;
						}
					}
					.btnShadow{
						width: 100%;
						height: 100%;
						background-color: transparent;
						position: absolute;
						top: 0;
						left: 0;
						z-index: 10;
					}
				}


				// 有权限
				.gL_preferPrice {
					margin-top: 38rpx;
					padding: 0 20rpx;

					.gL_origPrice {
						display: flex;
						justify-content: space-between;

						view {
							width: 290rpx;
							height: 150rpx;
							border: 2rpx solid #E7DEC8;
							border-radius: 16rpx;
							font: 600 28rpx/40rpx PingFang SC;
							color: #CBAF87;
							display: flex;
							flex-direction: column;
							align-items: center;
							padding: 22rpx 0;

							span {
								font: 500 40rpx/56rpx PingFang SC;
								margin-top: 10rpx;
							}
						}

						view:nth-child(2) {
							background-color: #E7DEC8;
						}
					}

					.gL_adjustPrice {
						margin: 60rpx 0 40rpx 0;
						font: 600 28rpx/40rpx PingFang SC;
						color: #000;
					}

					.gL_input {
						width: 100%;
						height: 84rpx;
						background-color: #F9F6F3;
						border-radius: 4rpx;

						input {
							height: 84rpx;
							font: 500 28rpx/40rpx PingFang SC;
							color: #939393;
							padding-left: 24rpx;
						}
					}
				}

				.gL_confirmBtn {
					width: 100%;
					height: 80rpx;
					background-color: #1A1C20;
					border-radius: 8rpx;
					margin-top: 146rpx;
					text-align: center;
					font: 500 24rpx/80rpx PingFang SC;
					color: #fff;
				}
			}
		}
		
		
		//遮罩
		.mE_btnShadow{
			width: 100%;
			height: 100%;
			position: fixed;				
			z-index: 502;
			top: 0;
			left: 0;
			text-align: center;
			background-color: rgba(0,0,0,0.6);
			.mE_btnContent{
				width: 528rpx;
				height: 300rpx;
				background-color: #fff;
				border-radius: 8rpx;
				position: absolute;
				top: 0;
				left: 0;
				bottom: 0;
				right: 0;
				margin: auto;
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				align-items: center;
				padding: 30rpx 48rpx 40rpx;
				h2{font: 600 30rpx/40rpx PingFang SC; color:#292A2B;}
				h3{font: 500 28rpx/40rpx PingFang SC; color:#292A2B;}
				.mE_btn{
					// margin-top: 74rpx;
					width: 100%;
					display: flex;
					justify-content: space-between;
					view{
						width: 196rpx;
						height: 64rpx;
						border-radius: 32rpx;
						background-color: #F5F5F5;
						font: 400 26rpx/64rpx PingFang SC; 
						color:#0A0605;
					}
					.mE_btn2{
						background-color: #EBB964;
						color: #fff;
					}
				}
			}
		}
	}
</style>
